import java.util.*;

/**
 * @author LKQ
 * @date 2022/3/22 21:11
 * @description 让n-1个元素加1，相当于让1个元素减一。
 */
public class Solution {
    public static void main(String[] args) {

    }
    public int minMoves(int[] nums) {
        int minNum = Arrays.stream(nums).min().getAsInt();
        int res = 0;
        for(int i: nums) {
            res += i - minNum;
        }
        return res;
    }
}
